 
            g_nAppID = 570;
            g_bIsAppIdDefaultForUniverse = 1;

            g_strAllClassPortraitURL = 'http://cdn.dota2.com.cn/apps/dota2/images/store/allclass.jpg';

            g_strDotaStoreURL = 'http://store.dota2.com.cn/';
            g_strDotaCartURL = 'http://store.dota2.com.cn/cart/';

            g_strLanguage = 'zh-cn';
            g_strCurrency = 'RMB';

            g_nMaxDisplayItems = 15; // Maximum # of items to display per page
            g_iCurrentPage = 0;
            g_rgDisplayItemCounts = [[15, 75, -1], [20, 60, -1]];
            g_nMaxPages = 0; // Computed when the page is ready
            g_nNumItemsInCart = 0;
            g_nItemsPerRow = 5;
            g_strRenderItemsBaseURL = 'http://store.dota2.com.cn/renderitems/?ajax=1&l=schinese&c=RMB&v=_M1481589375';
            g_strLocalized = {
                all: '所有'
            };

            $(function() {
                // Display popup dialog?
                var strPopupTitle = $.cookie('PopupTitle');
                var strPopupText = $.cookie('PopupText');
                if (strPopupTitle && strPopupText && strPopupTitle.length && strPopupText.length) {
                    strPopupTitle = decodeURIComponent(strPopupTitle).replace(/\+/g, '%20');
                    strPopupText = decodeURIComponent(strPopupText).replace(/\+/g, '%20');

                    // Delete cookies
                    jQuery.cookie('PopupTitle', null, {
                        path: '/'
                    });
                    jQuery.cookie('PopupText', null, {
                        path: '/'
                    });

                    var rgButtonData = {
                        text: ['查看库存', '确定'],

                        callbacks: [function() {
                            DoRedirect('http://steamcommunity.com/profiles/0/inventory/');
                        },
                        null // Close
                        ]
                    };
                    GenericDialog.ShowGenericTwoButtonDialog(decodeURI(strPopupTitle), decodeURI(strPopupText), rgButtonData);
                }
            });
        
        
            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-33822635-2']);
            _gaq.push(['_setSampleRate', '1']);
            _gaq.push(['_setDomainName', 'dota2.com']);
            _gaq.push(['_trackPageview']);

            (function() {
                var ga = document.createElement('script');
                ga.type = 'text/javascript';
                ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl': 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0];
                s.parentNode.insertBefore(ga, s);
            })();
        
        
            var GenericDialog = {
                $m_Buttons: null,
                $m_ButtonText: null,
                $m_CloseButton: null,
                m_bInitialized: false,

                Init: function() {
                    if (this.m_bInitialized) return;

                    $('#GenericModal').overlay({
                        mask: {
                            color: '#000',
                            loadSpeed: 'fast'
                        },
                        closeOnClick: true,
                        speed: 'fast',
                        top: 'center',
                        close: false
                    });

                    this.$m_CloseButton = $('#GenericModal_CloseButton');

                    this.$m_Buttons = [$('#GenericModal_Button0'), $('#GenericModal_Button1')];

                    this.$m_ButtonText = [this.$m_Buttons[0].find('span'), this.$m_Buttons[1].find('span')];

                    this.m_bInitialized = true;
                },

                DoShowDialog: function(strTitle, strMsg) {
                    $('#GenericModalTitle').html(strTitle);
                    $('#ModalBigText').html(strMsg);

                    $('#GenericModal').overlay().load();
                },

                ShowGenericDialog: function(strTitle, strMsg, strButtonText) {
                    this.Init();

                    strButtonText = strButtonText || '确定';
                    this.$m_ButtonText[1].html(strButtonText);

                    this.$m_Buttons[0].hide();
                    this.$m_Buttons[1].show();

                    this.$m_Buttons[0].removeClass('AlignModalButtonLeft');
                    this.$m_Buttons[1].removeClass('AlignModalButtonRight');
                    this.$m_Buttons[1].addClass('AlignModalButtonCenter');

                    this.SetupDefaultButtonBehaviors();

                    this.DoShowDialog(strTitle, strMsg);
                },

                ShowGenericTwoButtonDialog: function(strTitle, strMsg, rgButtonData) {
                    this.Init();

                    this.$m_ButtonText[0].html(rgButtonData.text[0]);
                    this.$m_ButtonText[1].html(rgButtonData.text[1]);

                    this.$m_Buttons[0].show();
                    this.$m_Buttons[1].show();

                    this.$m_Buttons[0].addClass('AlignModalButtonLeft');
                    this.$m_Buttons[1].addClass('AlignModalButtonRight');

                    this.SetupDefaultButtonBehaviors();

                    this.$m_Buttons[0].on('click', rgButtonData.callbacks[0]);

                    // Only override close behavior if specified
                    if (rgButtonData.callbacks[1] != null) {
                        this.$m_Buttons[1].on('click', rgButtonData.callbacks[1]);
                    }

                    this.DoShowDialog(strTitle, strMsg);
                },

                ShowErrorDialog: function(strError) {
                    this.ShowGenericDialog('错误', strError);
                },

                CloseErrorDialog: function() {
                    $('#GenericModal').overlay().close();
                },

                SetupDefaultButtonBehaviors: function() {
                    this.$m_CloseButton.on('click', this.CloseErrorDialog);

                    this.$m_Buttons[1].on('click', this.CloseErrorDialog);
                }
            };
        
               <script language="javascript">
            function MM_preloadImages() { //v3.0
                var d = document;
                if (d.images) {
                    if (!d.MM_p) d.MM_p = new Array();
                    var i, j = d.MM_p.length,
                    a = MM_preloadImages.arguments;
                    for (i = 0; i < a.length; i++) if (a[i].indexOf("#") != 0) {
                        d.MM_p[j] = new Image;
                        d.MM_p[j++].src = a[i];
                    }
                }
            }

            function PreloadHeaderImages() {
                //  Preload header rollover images
                //MM_preloadImages(
                //);
            }

            if (document.addEventListener) {
                document.addEventListener("DOMContentLoaded", PreloadHeaderImages, false);
            } else if (document.attachEvent) {
                document.attachEvent('onDomContentLoaded', PreloadHeaderImages);
            }
        
        <script language="javascript">
            function closeSubMenu(target) {
                $(target).find('.dn_arrow').attr("src", "http://cdn.dota2.com.cn/apps/dota2/images/nav/arrow.png");
                $(target).find('.menuSubItemList').hide();
            }

            function closeAllSubMenus() {
                $('.navItem').each(function() {
                    closeSubMenu($(this));
                });
            }

            function openSubMenu(target) {
                closeAllSubMenus();

                $(target).find('.dn_arrow').attr("src", "http://cdn.dota2.com.cn/apps/dota2/images/nav/arrow_over.png");

                // Show the sub-menu
                var subItemList = $(target).find('.menuSubItemList');
                if (subItemList.length) {
                    var itemTop = $(target).position().top + $(target).outerHeight() - 16;
                    var itemLeft = $(target).position().left;
                    subItemList.css({
                        "top": itemTop + 'px',
                        "left": itemLeft
                    }).fadeIn('fast');
                }
            }

            $(document).ready(function() {
                // Deal with the nav bars
                $('.navItem').each(function() {
                    $(this).hover(function() {
                        $(this).find('a.navBarItem img.top').animate({
                            "opacity": 1
                        },
                        100);
                        if ($(this).find('.menuSubItemList').length !== 0) {
                            openSubMenu(this);
                        }
                    },
                    function() {
                        $(this).find('a.navBarItem img.top').animate({
                            "opacity": 0
                        },
                        100);
                        if ($(this).find('.menuSubItemList').length !== 0) {
                            closeSubMenu(this);
                        }
                    });
                });

                // Deal with header drop-downs
                var strMenus = '#languageSelector';

                $(strMenus).each(function() {
                    $(this).hover(function() {
                        //show its submenu
                        $(this).find('div').fadeIn('fast');
                    },
                    function() {
                        //hide its submenu
                        $(this).find('div').hide();
                    });
                });
            });
        
         
                        $(function() {
                            var $storeSearchInput = $('#StoreSearchInput');
                            var $storeSearchResultsContainer = $('#StoreSearchResultsContainer');
                            var $storeSearchResults = $('#StoreSearchResults');
                            var $storeSearchResultsSpinner = $('#StoreSearchResultsSpinner');

                            // Set up the spinner and hide the results
                            $storeSearchResultsContainer.show();
                            $storeSearchResultsSpinner.spin({
                                lines: 11,
                                length: 5,
                                width: 3,
                                radius: 8,
                                rotate: 0,
                                color: '#fff',
                                speed: 1,
                                trail: 60,
                                shadow: false,
                                hwaccel: false,
                                className: 'spinner',
                                zIndex: 2e9,
                                top: 'auto',
                                left: 'auto'
                            }).hide();
                            $storeSearchResultsContainer.hide();

                            var strLastStoreSearchInput = $storeSearchInput.val();
                            var storeDelayTimerID = false;
                            $storeSearchInput.bind("propertychange keyup input paste",
                            function() {

                                var strNewVal = $storeSearchInput.val();
                                if (strNewVal == strLastStoreSearchInput) return;

                                strLastStoreSearchInput = strNewVal;

                                $storeSearchResultsContainer.show();

                                if (storeDelayTimerID !== false) window.clearTimeout(storeDelayTimerID);

                                $storeSearchResults.html('');

                                var bIsNewValEmpty = (strNewVal.replace(/^\s+|\s+$/g, '') === '') if (bIsNewValEmpty) {
                                    $storeSearchResultsContainer.hide();
                                    $storeSearchResultsSpinner.hide();
                                } else {
                                    $storeSearchResultsSpinner.show();
                                }

                                storeDelayTimerID = window.setTimeout(function() {

                                    var strQueryVal = $storeSearchInput.val();
                                    var bIsQueryEmpty = (strQueryVal.replace(/^\s+|\s+$/g, '') === '') if (bIsQueryEmpty) return;

                                    var strNoItemsFoundHTML = '<div class="NoItems">未找到结果</div>';

                                    $.post('http://store.dota2.com.cn/searchdata?ajax=1&l=schinese&c=RMB&appid=570&v=_M1481589375', {
                                        'query': strQueryVal
                                    }).done(function(json) {
                                        if (strLastStoreSearchInput === strQueryVal) {
                                            if (json.result.html !== '') $storeSearchResults.html(json.result.html);
                                            else $storeSearchResults.html(strNoItemsFoundHTML);
                                        }
                                    }).error(function(jqXHR, e) {
                                        if (strLastStoreSearchInput === strQueryVal) {
                                            console.log('Error while searching for "' + strQueryVal + '": ' + e) $storeSearchResults.html(strNoItemsFoundHTML);
                                        }
                                    }).always(function() {
                                        if (strLastStoreSearchInput === strQueryVal) {
                                            $storeSearchResultsSpinner.hide();
                                        }
                                    });
                                },
                                400);
                            });

                            $storeSearchResults.delegate('.ItemContainerRow', 'mousedown',
                            function() {
                                return false;
                            });

                            $storeSearchResults.delegate('.ItemContainerRow', 'click',
                            function() {
                                window.location.href = $(this).find('a').attr('href');
                                return false;
                            });

                            $storeSearchInput.focus(function() {
                                var strQueryVal = $storeSearchInput.val();
                                var bIsQueryEmpty = (strQueryVal.replace(/^\s+|\s+$/g, '') === '') if (!bIsQueryEmpty) {
                                    $storeSearchResultsContainer.show();
                                }
                                $storeSearchInput.data('placeholder', $storeSearchInput.attr('placeholder'));
                                $storeSearchInput.attr('placeholder', '');
                            });

                            $storeSearchInput.blur(function() {
                                $storeSearchResultsContainer.hide();
                                $storeSearchInput.attr('placeholder', $storeSearchInput.data('placeholder'));
                                $storeSearchInput.data('placeholder', '');
                            });
                        });
                    
                     
                        function ShowCartButtonSpinner(bShow, bDim) {
                            if (bShow) {
                                var opts = {
                                    lines: 8,
                                    // The number of lines to draw
                                    length: 0,
                                    // The length of each line
                                    width: 3,
                                    // The line thickness
                                    radius: 4,
                                    // The radius of the inner circle
                                    color: bDim ? '#444': '#eee',
                                    // #rbg or #rrggbb
                                    speed: 2.1,
                                    // Rounds per second
                                    trail: 100,
                                    // Afterglow percentage
                                    shadow: true // Whether to render a shadow
                                };
                                this.$Spinner = $('#CartButton').spin(opts);
                            } else {
                                // Remove the spinner
                                this.$Spinner.unspin();
                            }
                        }

                        $(function() {
                            function ShowCartButtonText(bShow) {
                                $('#CartButtonText').removeClass('Hidden');
                            }

                            // If the cookie is present, grab it and early out
                            var unQuantity = Common_GetCartQuantityFromCookie();
                            if (null !== unQuantity) {
                                ShowCartButtonText(true);
                                UpdateNumItemsInCartAbsolute(unQuantity);
                                return;
                            }

                            ShowCartButtonSpinner(true);

                            var rgParams = {
                                action: "get_item_count",
                                appid: g_nAppID,
                                c: g_strCurrency,
                                l: g_strLanguage,
                                ajax: 1
                            };

                            var strCartURL = "http://store.dota2.com.cn/cart/";
                            $.post(strCartURL, rgParams,
                            function(json) {
                                ShowCartButtonSpinner(false);
                                ShowCartButtonText(true);

                                // On failure, display an error and reload the page
                                if (json.success) {
                                    // Update item count and text.
                                    UpdateNumItemsInCartAbsolute(json.item_count);

                                    // Update the cookie.
                                    Common_UpdateCartQuantityCookie(json.item_count);
                                } else {
                                    GenericDialog.ShowErrorDialog('在添加物品至您的购物车时发生错误。请过几分钟再试。');
                                }
                            }).error(function(jqXHR, e) {
                                ShowCartButtonSpinner(false);
                                ShowCartButtonText(true);

                                // Inform the user.
                                GenericDialog.ShowErrorDialog('载入您的购物车时发生错误。您可能在接下来几分钟内添加物品至购物车时遇到问题。');
                            });
                        });
                    
                </div>
                
                    g_rgStoreTabs = ["1909853392", "904640596", "3634838168", "3776899405", "130584270"];
                    g_rgStoreCategories = {
                        "1909853392": {
                            "label": "\u4e3b\u6253",
                            "id": "1909853392",
                            "parent_id": 0,
                            "default": true,
                            "tab_image_override_name": null,
                            "children": [],
                            "home": true
                        },
                        "904640596": {
                            "label": "",
                            "id": "904640596",
                            "parent_id": 0,
                            "default": false,
                            "tab_image_override_name": null,
                            "children": [],
                            "home": false,
                            "dropdown_prefab_id": 3814588639,
                            "custom_filter_name": "current_sales"
                        },
                        "3634838168": {
                            "label": "\u82f1\u96c4\u5957\u88c5",
                            "id": "3634838168",
                            "parent_id": 0,
                            "default": false,
                            "tab_image_override_name": null,
                            "children": [],
                            "home": false,
                            "dropdown_prefab_id": 1468829639
                        },
                        "3776899405": {
                            "label": "\u7269\u54c1",
                            "id": "3776899405",
                            "parent_id": 0,
                            "default": false,
                            "tab_image_override_name": null,
                            "children": [{
                                "name": "\u73cd\u85cf",
                                "id": "4172648756"
                            },
                            {
                                "name": "\u5de5\u5177",
                                "id": "3942309495"
                            },
                            {
                                "name": "",
                                "id": "1532033519"
                            },
                            {
                                "name": "\u4fe1\u4f7f",
                                "id": "1114825040"
                            },
                            {
                                "name": "\u7cfb\u7edf\u5e7f\u64ad",
                                "id": "1073146881"
                            },
                            {
                                "name": "\u97f3\u4e50",
                                "id": "3444712010"
                            },
                            {
                                "name": "\u5b88\u536b",
                                "id": "2443340223"
                            },
                            {
                                "name": "\u6e38\u620f\u754c\u9762\u76ae\u80a4",
                                "id": "3128342843"
                            },
                            {
                                "name": "\u8f7d\u5165\u753b\u9762",
                                "id": "2009595502"
                            },
                            {
                                "name": "\u52a8\u6001\u804a\u5929\u8868\u60c5\u5305",
                                "id": "2585178519"
                            }],
                            "home": false,
                            "dropdown_prefab_id": 3814588639
                        },
                        "4172648756": {
                            "label": "\u73cd\u85cf",
                            "id": "4172648756",
                            "parent_id": 3776899405,
                            "default": false,
                            "tab_image_override_name": null,
                            "parent_name": "\u7269\u54c1",
                            "children": [],
                            "home": false,
                            "dropdown_prefab_id": 3814588639
                        },
                        "3942309495": {
                            "label": "\u5de5\u5177",
                            "id": "3942309495",
                            "parent_id": 3776899405,
                            "default": false,
                            "tab_image_override_name": null,
                            "parent_name": "\u7269\u54c1",
                            "children": [],
                            "home": false,
                            "dropdown_prefab_id": 3814588639
                        },
                        "1532033519": {
                            "label": "",
                            "id": "1532033519",
                            "parent_id": 3776899405,
                            "default": false,
                            "tab_image_override_name": null,
                            "parent_name": "\u7269\u54c1",
                            "children": [],
                            "home": false,
                            "dropdown_prefab_id": 3814588639
                        },
                        "1114825040": {
                            "label": "\u4fe1\u4f7f",
                            "id": "1114825040",
                            "parent_id": 3776899405,
                            "default": false,
                            "tab_image_override_name": null,
                            "parent_name": "\u7269\u54c1",
                            "children": [],
                            "home": false,
                            "dropdown_prefab_id": 3814588639
                        },
                        "1073146881": {
                            "label": "\u7cfb\u7edf\u5e7f\u64ad",
                            "id": "1073146881",
                            "parent_id": 3776899405,
                            "default": false,
                            "tab_image_override_name": null,
                            "parent_name": "\u7269\u54c1",
                            "children": [],
                            "home": false,
                            "dropdown_prefab_id": 3814588639
                        },
                        "3444712010": {
                            "label": "\u97f3\u4e50",
                            "id": "3444712010",
                            "parent_id": 3776899405,
                            "default": false,
                            "tab_image_override_name": null,
                            "parent_name": "\u7269\u54c1",
                            "children": [],
                            "home": false,
                            "dropdown_prefab_id": 3814588639
                        },
                        "2443340223": {
                            "label": "\u5b88\u536b",
                            "id": "2443340223",
                            "parent_id": 3776899405,
                            "default": false,
                            "tab_image_override_name": null,
                            "parent_name": "\u7269\u54c1",
                            "children": [],
                            "home": false,
                            "dropdown_prefab_id": 3814588639
                        },
                        "3128342843": {
                            "label": "\u6e38\u620f\u754c\u9762\u76ae\u80a4",
                            "id": "3128342843",
                            "parent_id": 3776899405,
                            "default": false,
                            "tab_image_override_name": null,
                            "parent_name": "\u7269\u54c1",
                            "children": [],
                            "home": false,
                            "dropdown_prefab_id": 3814588639
                        },
                        "2009595502": {
                            "label": "\u8f7d\u5165\u753b\u9762",
                            "id": "2009595502",
                            "parent_id": 3776899405,
                            "default": false,
                            "tab_image_override_name": null,
                            "parent_name": "\u7269\u54c1",
                            "children": [],
                            "home": false,
                            "dropdown_prefab_id": 3814588639
                        },
                        "2585178519": {
                            "label": "\u52a8\u6001\u804a\u5929\u8868\u60c5\u5305",
                            "id": "2585178519",
                            "parent_id": 3776899405,
                            "default": false,
                            "tab_image_override_name": null,
                            "parent_name": "\u7269\u54c1",
                            "children": [],
                            "home": false,
                            "dropdown_prefab_id": 3814588639
                        },
                        "130584270": {
                            "label": "\u804c\u4e1a\u5546\u5e97",
                            "id": "130584270",
                            "parent_id": 0,
                            "default": false,
                            "tab_image_override_name": null,
                            "children": [{
                                "name": "\u804c\u4e1a\u8d5b\u4e8b",
                                "id": "3837590211"
                            },
                            {
                                "name": "\u6218\u961f",
                                "id": "2529305176"
                            }],
                            "home": false,
                            "dropdown_prefab_id": 3814588639
                        },
                        "3837590211": {
                            "label": "\u804c\u4e1a\u8d5b\u4e8b",
                            "id": "3837590211",
                            "parent_id": 130584270,
                            "default": false,
                            "tab_image_override_name": null,
                            "parent_name": "\u804c\u4e1a\u5546\u5e97",
                            "children": [],
                            "home": false,
                            "dropdown_prefab_id": 3814588639
                        },
                        "2529305176": {
                            "label": "\u6218\u961f",
                            "id": "2529305176",
                            "parent_id": 130584270,
                            "default": false,
                            "tab_image_override_name": null,
                            "parent_name": "\u804c\u4e1a\u5546\u5e97",
                            "children": [],
                            "home": false,
                            "dropdown_prefab_id": 3814588639
                        }
                    };

                    g_nDefaultCategoryID = 1909853392;
                    g_nHomeCategoryID = 1909853392;
                    g_bRedirectOnTabClick = 0;
                    g_nMenuFadeDuration = 250;
                    g_nSelectedCategoryID = null; // The actual selected category - initialized by first ChangeCategory() call in store.js
                    g_nSelectedTabID = null; // The selected tab - initialized by first ChangeCategory() call in store.js
                    // HUD Skins & Loading Screens
                    g_rgStoreCategories['34589234'] = {
                        'children': [{
                            'id': '3128342843',
                            name: ''
                        },
                        {
                            'id': '2009595502',
                            name: ''
                        },
                        ],
                        'default': false,
                        'dropdown_prefab_id': 3814588639,
                        'home': false,
                        'id': '34589234',
                        'parent_id': 3776899405,
                        'tab_image_override_name': null
                    };
                    // Tools & Keys
                    g_rgStoreCategories['54869489'] = {
                        'children': [{
                            'id': '3942309495',
                            name: ''
                        },
                        {
                            'id': '4172648756',
                            name: ''
                        },
                        ],
                        'default': false,
                        'dropdown_prefab_id': 3814588639,
                        'home': false,
                        'id': '54869489',
                        'parent_id': 3776899405,
                        'tab_image_override_name': null
                    };

                    function GetTab(nTabID) {
                        return $('#StoreTab_' + nTabID);
                    }

                    function GetMenu(nMenuID) {
                        return $('#StoreTabMenu_' + nMenuID);
                    }

                    function DoHideMenu(nMenuID) {
                        // Hide
                        $Menu = GetMenu(nMenuID);
                        $Menu.animate({
                            opacity: 0
                        },
                        g_nMenuFadeDuration);
                    }

                    function PositionMenu(nCurMenuID) {
                        $Tab = GetTab(nCurMenuID);
                        var nLeftOffset = 0;
                        if ($Tab.find('.StoreTabMenu').data('fullwidth')) {
                            nLeftOffset = $Tab.parent().offset().left - $Tab.offset().left;
                        }
                        GetMenu(nCurMenuID).offset({
                            top: $Tab.offset().top + $Tab.outerHeight(),
                            left: $Tab.offset().left + nLeftOffset
                        });
                    }

                    function HideMenu(nMenuID) {
                        GetMenu(nMenuID).hide();
                    }

                    function BIsHomeCategory(unCategoryID) {
                        return unCategoryID == g_nHomeCategoryID;
                    }

                    function BIsHomeCategorySelected() {
                        return g_nSelectedCategoryID == g_nHomeCategoryID;
                    }

                    $(function() {
                        // Init positions of the menus, which will be static
                        var $Tab;
                        PositionMenu(3776899405);
                        PositionMenu(130584270);

                        // Hover function for menus
                        $('#StoreTabButtons ').on('mouseenter', '.StoreTabMenuButton',
                        function() {
                            var nMenuID = $(this).attr('data-categoryid');
                            GetMenu(nMenuID).fadeIn(g_nMenuFadeDuration);
                            PositionMenu(nMenuID);
                        }).on('mouseleave', '.StoreTabMenuButton',
                        function() {
                            var nMenuID = $(this).attr('data-categoryid');
                            HideMenu(nMenuID);
                        }).on('click', '.StoreTab',
                        function() {
                            var nCategoryID = $(this).attr('data-categoryid');
                            ChangeCategory(nCategoryID, true);
                            HideMenu(nCategoryID);
                            return false;
                        }).on('click', '.StoreTabMenuItem',
                        function() {
                            var nCategoryID = $(this).attr('data-categoryid');
                            var strFilterHero = $(this).data('filter-hero');
                            ChangeCategory(nCategoryID, true, strFilterHero ? {
                                'h': strFilterHero
                            }: undefined);

                            var nParentID = $(this).attr('data-parentcategoryid');
                            HideMenu(nParentID);

                            return false;
                        });
                    });
                
                
                                    $(function() {
                                        $('.MiniGridNavButton').on('click',
                                        function(e) {
                                            var $Button = $(this);
                                            var $AllButtons = $Button.parent().children('.MiniGridNavButton');

                                            $AllButtons.removeClass('ActiveMiniGridButton').removeClass('GrayButton').addClass('DarkGrayButton');
                                            $Button.addClass('ActiveMiniGridButton').removeClass('DarkGrayButton').addClass('GrayButton');

                                            // Hide all children
                                            $('#MiniGridViews').children().hide();

                                            // Show the footer if appropriate
                                            if ($(e.currentTarget).data('show-nav-footer')) $('#MainFeaturedNavFooter').show();

                                            // Fade in the desired div
                                            var strDivToShow = $(e.currentTarget).data('areaid');
                                            $('#' + strDivToShow).fadeIn();
                                        });
                                    });
                                
                                
                        var g_FeaturedTab = {
                            _SetHTMLOrHide: function(strElemName, strHTML, bAllowHide, bHideParent) {
                                var $View = $('#' + strElemName);
                                if ($View.length == 0) return;

                                if ((!strHTML || $.trim(strHTML).length == 0) && bAllowHide) {
                                    var $HidePanel;
                                    if (bHideParent) {
                                        $HidePanel = $View.parent();
                                    } else {
                                        $HidePanel = $View;
                                    }

                                    $HidePanel.fadeOut();
                                } else {
                                    $View.parent().show();

                                    $View.html(strHTML);
                                }
                            },

                            _OnAjaxFailed: function() {
                                if (this.nTimerID != undefined) {
                                    clearTimeout(this.nTimerID);
                                }

                                this.nTimerID = setTimeout(function() {
                                    GenericDialog.ShowErrorDialog('从服务器载入数据时发生错误。请在数分钟后重试。');
                                },
                                700);
                            },

                            _LoadFeaturedData: function(bSpotlightOnly) {
                                var This = this;
                                $.get('http://store.dota2.com.cn/featured/?ajax=1&l=schinese&c=RMB&v=_M1481589375',
                                function(json) {
                                    if (json.result) {
                                        This._SetHTMLOrHide('SpotlightItemView', json.spotlight.html, true, true);

                                        if (!bSpotlightOnly) {
                                            This._SetHTMLOrHide('SpotlightTreasureView', json.spotlight_treasure.html, true, true);
                                            This._SetHTMLOrHide('CarouselView', json.carousel.html, true, false);
                                            //This._SetHTMLOrHide( 'PopularToolsView', json.popular_tools.html, true, true );
                                            This._SetHTMLOrHide('NewReleasesView', json.new_equippable_items.html, false, true);
                                            This._SetHTMLOrHide('PopularItemsView', json.popular_items.html, false, true);
                                            This._SetHTMLOrHide('NewTournamentsView', json.new_tournaments.html, true, true);
                                            This._SetHTMLOrHide('NewInterfaceItemsView', json.new_interface_items.html, true, true);
                                        }
                                    }
                                }).error(This._OnAjaxFailed);
                            },

                            LoadNextSpotlightSale: function() {
                                this._LoadFeaturedData(true);
                            },

                            _LoadMarketData: function() {},

                            _LoadWorkshopData: function() {},

                            Load: function() {
                                if (this.m_bInitialized != undefined) return;

                                this._LoadFeaturedData(false);
                                this._LoadMarketData();
                                this._LoadWorkshopData();

                                this.m_bInitialized = true;
                            }
                        }
                    